<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>模特-魔步网</title>
<?php include_once(VIEWPATH."public/header_title.php");?>
<link href="<?php echo _get_cfg_path('css')?>base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('css')?>common.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="<?php echo _get_cfg_path('js')?>DD_belatedPNG.js" type="text/javascript" ></script>
<script>DD_belatedPNG.fix('a,img');</script>
<![endif]-->
</head>
<body>
<?php include_once(VIEWPATH."public/header.php");?>
<div class="mainbody">
	<div class="container">
        <!--div class="mode_title clearfix">
            <a class="fl picimg" href="<?=_create_url('model', array_merge($arrParam, array('sex'=>1)) )?>"><img src="<?=_get_cfg_path('images')?>models_1.jpg"/></a>
            <a class="fr picimg" href="<?=_create_url('model', array_merge($arrParam, array('sex'=>2)) )?>"><img src="<?=_get_cfg_path('images')?>models_2.jpg"/></a>
        </div>
        <div class="m_sort">
        	<ul class="clearfix" style="width:100%">
        		<?php foreach ($areaType as $key=>$val):?>
        			<li style="width:<?=number_format(100/count($areaType)-1,1)?>%;<?php if ($key != count($areaType)-1):?>margin-right:1.33%;<?php else:?>margin-right:0;<?php endif;?>"><a href="<?=_create_url('model', array_merge($arrParam, array('area'=>$key)) )?>" <?php if (isset($arrParam['area']) && $arrParam['area'] === $key) echo "class='curr'";?>><?=$val?>模特</a></li>
        		<?php endforeach;?>
            	<!--<li style="width:48.5%"><a href="<?=_create_url('model', array_merge($arrParam, array('area'=>0)) )?>" <?php if (isset($arrParam['area']) && $arrParam['area'] === 0) echo "class='curr'";?>>亚洲模特</a></li>
                <li style="width:48.5%;float:right;margin-right:0;"><a href="<?=_create_url('model', array_merge($arrParam, array('area'=>1)) )?>" <?php if (isset($arrParam['area']) && $arrParam['area'] === 1) echo "class='curr'";?>>欧美模特</a></li>
                <li><a href="##">平面模特</a></li>
                <li><a href="##">T台模特</a></li>
                <li><a href="##">影视模特</a></li>
                <li><a href="##">新人模特</a></li>
                <li><a href="##">活动模特</a></li>
            </ul>
        </div-->
        <div class="m_filter" style="margin-top: 10px;">
        	<div class="filterBox"><!--style="display:<?php if(!empty($arrParam)) echo 'block';else echo 'none';?>"-->
                <!--<div class="values"><span class="label">类型：</span>
                    <p class="clearfix"><a href="##" class="curr" title="不限">不限</a><a href="##" title="韩系名媛">韩系名媛</a><a href="##" title="气场欧美">气场欧美</a><a href="##" title="优雅复古">优雅复古</a><a href="##" title="清新文艺">清新文艺</a><a href="##" title="英伦学院">英伦学院</a><a href="##" title="甜美日系">甜美日系</a><a href="##" title="OL通勤">OL通勤</a><a href="##" title="接头混搭">接头混搭</a><a href="##" title="性感诱惑">性感诱惑</a></p>
                </div>-->
                <div class="values"><span class="label">风格：</span>
                <p class="clearfix">
                    <a <?php if(empty($arrParam['style'])):?> class="curr"<?php endif?> href="<?php if(!empty($arrParam['style'])){$tmp_arrParam = $arrParam; unset($tmp_arrParam['style']); echo _create_url('model', $tmp_arrParam );}?>" title="不限">不限</a>
                    <?php foreach ($oSysModelstyle as $key => $v):?>
                        <a href="<?=_create_url('model', array_merge($arrParam, array('style'=>$v['id'])) )?>" title="<?=$v['name']?>"<?php if(!empty($arrParam['style']) && $arrParam['style']==$v['id']) echo ' class="curr"';?>><?=$v['name']?></a>
                    <?php endforeach;?>
                </p>
            </div>
            <!--
                <div class="values"><span class="label">地区：</span>
                    <p class="clearfix"><a href="##" class="curr" title="不限">不限</a><a href="##" title="160-170cm ">160-170cm</a><a href="##" title="170-180cm">170-180cm</a><a href="##" title="＞180cm">＞180cm</a></p>
                </div>-->
                <div class="values"><span class="label">身高：</span>
                    <p class="clearfix">
                    	<a id="height_any" <?php if(empty($arrParam['height']) && !isset($arrParam['min_height']) && !isset($arrParam['max_height'])):?> class="curr"<?php endif?> href="<?php if(!empty($arrParam['height'])){$tmp_arrParam = $arrParam; unset($tmp_arrParam['height']); echo _create_url('model', $tmp_arrParam );}?>" title="不限">不限</a>
                        <?php if (!empty($oHeight)):  
                        foreach ($oHeight as $hight) :?>
                            <a href="<?php $tem_param = $arrParam;unset($tem_param['min_height']);unset($tem_param['max_height']);echo _create_url('model', array_merge($tem_param, array('height'=>$hight['name'])))?>" title="cm" <?php if(!empty($arrParam['height']) && (urldecode($arrParam['height']) == $hight['name'])) {echo ' class="curr"';}?>><?php if (count(explode('-', $hight['name'])) > 1 && substr($hight['name'], 0,1) !='-') echo $hight['name']; elseif(strstr($hight['name'], '-')) echo str_replace('-', '<', $hight['name']); elseif (strstr($hight['name'], '*'))  echo str_replace('*', '>', $hight['name']);?>cm</a>
                        <?php endforeach; endif?>
                        <a href="javascript:void(0);" class="input_a_hover"><input class="height_input" value="<?=isset($arrParam['min_height'])?$arrParam['min_height']:''?>" type="text" id="min_height"/>&nbsp;-&nbsp;<input class="height_input" value="<?=isset($arrParam['max_height'])?$arrParam['max_height']:''?>" type="text" id="max_height"/>&nbsp;cm<button class="J_SortbarPriceSubmit btn height_button" type="button">确定</button></a>
                    </p>
                </div>
                <div class="values"><span class="label">地区：</span>
                    <p class="clearfix">
                    	<a id="city_any_adf" data-id="1" <?php if(empty($arrParam['city'])):?> class="curr"<?php endif?> href="<?php if(!empty($arrParam['city'])){$tmp_arrParam = $arrParam; unset($tmp_arrParam['city']); echo _create_url('model', $tmp_arrParam );}?>" title="不限">不限</a>
                        <?php $flag = 1;if (!empty($oCity)):  
                        foreach ($oCity as $city) :?>
                            <a href="<?php echo _create_url('model', array_merge($arrParam, array('city'=>$city['name'])))?>" title="地区" <?php if(!empty($arrParam['city']) && ($arrParam['city'] == $city['name'])) {$flag=2;echo' class="curr"';}?>><?php echo $city['name']?></a>
                        <?php endforeach; endif?>
      					<a href="javascript:void(0);" class="city_input_hover"><input type="text" class="city_input" value="<?=$flag==1&&isset($arrParam['city'])?$arrParam['city']:''?>" placeholder=""/>&nbsp;<button class="J_SortbarPriceSubmit btn city_button" data-url="<?php $tmp_arrParam = $arrParam; unset($tmp_arrParam['city']); echo _create_url('model', $tmp_arrParam );?>" type="button">确定</button></a>
                	</p>
                </div>
            
                <div class="values"><span class="label">排序：</span>
                    <p class="clearfix">
                        <a href="<?=_create_url('model', array_merge($arrParam, array('orderby'=>'1')) )?>" <?php if(!empty($arrParam['orderby']) && $arrParam['orderby']=='1') echo ' class="curr"';?>>按时间</a>
                        <a href="<?=_create_url('model', array_merge($arrParam, array('orderby'=>'2')) )?>" <?php if(!empty($arrParam['orderby']) && $arrParam['orderby']=='2') echo ' class="curr"';?>>按关注度</a>
                        <a href="<?=_create_url('model', array_merge($arrParam, array('orderby'=>'3')) )?>" <?php if(!empty($arrParam['orderby']) && $arrParam['orderby']=='3') echo ' class="curr"';?>>订单量</a></p>
                </div>
            </div>
            <div class="control_bar">
            	<a class="button_less <?php if(!empty($arrParam)) echo 'spred';?>" href="javascript:void(0);">更多选项<span class="ifont"></span></a>
            </div>
        </div>
    </div>
    <div class="women models">
        <div class="container">
        	<ul class="clearfix">
                <?php foreach ($list['rows'] as $key => $a): ?>
            	<li>
                    <a href="/i/index/<?=$a['id']?>" target="_blank" title="<?=$a['nickname']?>">
                        <div class="mtimg">
                            <img class="show" alt="<?=$a['nickname']?>" originalsrc="<?=$a['showimg']?>"/>
                            <img class="hide" alt="<?=$a['nickname']?>" originalsrc="<?=$a['showimg2']?>"/>
                        </div>
                        <span class="ins_no_hover">
                            <p><?=$a['nickname']?>&nbsp;&nbsp;&nbsp; <!--地址：--><?php echo $a['city']?></p>
                            <p class="clearfix"><em class="fl"><!--身高  三围  鞋码--><?=$a['height']?>cm  &nbsp;&nbsp;&nbsp;  <?php echo $a['bust'].'-'.$a['waist'].'-'.$a['hips']?>&nbsp;&nbsp;&nbsp; <?php echo $a['shoes']?>码 </em> <em class="fr">点击/<?php echo $a['num_info']['visitnum']?></em></p>
                        </span>
                    </a>
                </li>
                <?php endforeach;?>                            	
            </ul>
            <br /><br />
            <div class="page">
              <?=$list['pages']?>
            </div>
            <br /><br />
        </div>
    </div>    
</div>
<!--mainbody-->
<?php include_once(VIEWPATH."public/footer.php");?>
</body>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>common.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>lyz.delayLoading.min.js"></script>
<script type="text/javascript">
$(function () {
	$("img").delayLoading({
		defaultImg: "<?php echo _get_cfg_path('images')?>loading.jpg",   // 预加载前显示的图片
		errorImg: "",                       // 读取图片错误时替换图片(默认：与defaultImg一样)
		imgSrcAttr: "originalSrc",          // 记录图片路径的属性(默认：originalSrc，页面img的src属性也要替换为originalSrc)
		beforehand: 0,                      // 预先提前多少像素加载图片(默认：0)
		event: "scroll",                    // 触发加载图片事件(默认：scroll)
		duration: "normal",                 // 三种预定淡出(入)速度之一的字符串("slow", "normal", or "fast")或表示动画时长的毫秒数值(如：1000),默认:"normal"
		container: window,                  // 对象加载的位置容器(默认：window)
		success: function (imgObj) {},      // 加载图片成功后的回调函数(默认：不执行任何操作)
		error: function (imgObj) {}         // 加载图片失败后的回调函数(默认：不执行任何操作)
	});

	$(".input_a_hover").hover(function(){
		$(".height_button").show();
	},function(){
		$(".height_button").hide();
	});
	$(".city_input_hover").hover(function(){
		$(".city_button").show();
	},function(){
		$(".city_button").hide();
	});
	//输入身高搜索
	$(".height_button").click(function(){
		var min_height = $.trim($("#min_height").val());
		var max_height = $.trim($("#max_height").val());
		if((!$.isNumeric(min_height) && min_height!='')||(!$.isNumeric(max_height) && max_height!=''))
		{
			if((!$.isNumeric(min_height) && min_height!=''))
			{
				$("#min_height").css("border","1px solid red");
			}
			if((!$.isNumeric(max_height) && max_height!=''))
			{
				$("#max_height").css("border","1px solid red");
			}
			return false;
		}
		if(min_height=='' && max_height=='')
		{
			return false;
		}
		if((max_height < min_height) && max_height!='' && min_height!='')
		{
			return false;
		}
		var url = $("#height_any").attr("href");
		if(url.indexOf("?") > 0)
		{
			url += "&min_height="+min_height+"&max_height="+max_height;
		}
		else
		{
			url += "?min_height="+min_height+"&max_height="+max_height;
		}
		window.location.href=url;
	});
	$("#min_height").focus(function(){
		$("#min_height").css("border","solid 1px #dfdfdf");
		$("#max_height").css("border","solid 1px #dfdfdf");
	});
	$("#max_height").focus(function(){
		$("#min_height").css("border","solid 1px #dfdfdf");
		$("#max_height").css("border","solid 1px #dfdfdf");
	});
	$(".city_input").focus(function(){
		$(".city_input").css("border","solid 1px #dfdfdf");
	});

	//输入城市搜索
	$(".city_button").click(function(){
		var city = $.trim($(".city_input").val());
		if(city == '')
		{
			$(".city_input").css("border","1px solid red");
			return false;
		}
		var url = $(this).attr("data-url");
		if(url.indexOf("?") > 0)
		{
			url += "&city="+city;
		}
		else
		{
			url += "?city="+city;
		}
		window.location.href=url;
	});
});
</script>
</html>